Skip to content

Better ci and docs#2

Merged
federico-martinez-invgate merged 5 commits into
mainfrom
better_ci_and_docs
Jul 10, 2026
Merged

Better ci and docs#2
federico-martinez-invgate merged 5 commits into
mainfrom
better_ci_and_docs

Conversation

@federico-martinez-invgate

Copy link
Copy Markdown
Contributor

No description provided.

Add [profile.release] to the workspace root: strip="symbols", lto="fat",
codegen-units=1. Shrinks the PHP extension from 3.68 MB to 2.36 MB (-36%).

Deliberately keeps panic="unwind" (the default): the sdsearch-php FFI boundary
relies on catch_unwind to turn a Rust panic into a catchable PhpException and keep
the PHP worker alive; panic="abort" would break that. Documented as an invariant
in the manifest.
on.push had no branch filter, so every job ran on both push and pull_request: a
push to a branch with an open PR built the whole pipeline twice. Restrict push to
main and v* tags (feature branches are covered by their pull_request run) and add a
concurrency group that cancels superseded in-flight runs.
Byte-by-byte layout of every ZSL index file (.cfs, .fnm, .fdt/.fdx, .tis/.tii,
.frq/.prx, .nrm, .del, segments.gen/segments_N) with ASCII field diagrams, the
modified-UTF-8 / SmallFloat / VInt quirks, and worked hex examples. Derived from the
parsers in sdsearch-core/src/zsl. Linked from ARCHITECTURE.md and the README.
Add sdsearch.stub.php: signatures + PHPDoc for the whole extension surface
(sdsearch_version, SdSearch\Engine, SdSearch\Writer) for IDEs/PHPStan; never loaded at
runtime. Add docs/API.md: narrative guide with end-to-end indexing/update/search
examples, the params + hit JSON contracts, and the field kinds. Symbol names verified by
Reflection against the compiled extension; stub passes 'php -n -l'. Linked from README.
On a v* tag, build + smoke-test three PHP 8.4 NTS binaries in parallel and publish
them to a GitHub Release:
  - sdsearch-windows-x64-php84nts.dll   (windows-latest, nightly + LLVM)
  - sdsearch-ubuntu-x64-php84nts.so     (ubuntu-latest, glibc ~2.39)
  - sdsearch-el8-x64-php84nts.so        (rockylinux:8 container, glibc 2.28)

The EL8 build (Rocky 8 + Remi PHP 8.4 NTS) links only up to GLIBC_2.28, so it loads on
RHEL/CentOS/Rocky/Alma 8 & 9 (verified locally in a rockylinux:8 container). ext-php-rs
needs PHP/PHP_CONFIG set explicitly in the container. The publish job asserts the tag
equals sdsearch-core's crate version, then attaches the binaries. workflow_dispatch runs
a build-only dry run (no release). github.ref_name is passed via env and quoted.
@github-actions

Copy link
Copy Markdown
Contributor

Code Metrics Report

main (92a895e) #2 (a6f4607) +/-
Coverage 96.4% 96.4% 0.0%
Test Execution Time 11s 5s -6s
Details
  |                     | main (92a895e) | #2 (a6f4607) | +/-  |
  |---------------------|----------------|--------------|------|
  | Coverage            |          96.4% |        96.4% | 0.0% |
  |   Files             |             36 |           36 |    0 |
  |   Lines             |           4398 |         4398 |    0 |
  |   Covered           |           4244 |         4244 |    0 |
+ | Test Execution Time |            11s |           5s |  -6s |

Reported by octocov

@federico-martinez-invgate federico-martinez-invgate merged commit bcba60d into main Jul 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant